#!/bin/bash
export HOMEDIR=$(dirname $(dirname $(readlink -f "${BASH_SOURCE[0]}")))
source $HOMEDIR/scripts/init-env.sh

schema_list=($(jq -r '.object.schemas[]' $HOMEDIR/config/mtk-config.json))

for i in "${schema_list[@]}"
do 
   echo "create user $i"
   $OSEXEC $GSQLEXEC -c "set client_min_messages=warning;create user $i password '${i,,}' sysadmin monadmin;"
done
